//
// Created by Jisam on 2024/8/20 9:35.
// Solution of  DX0012  并
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <vector>
#include<climits>

using namespace std;

#define endl "\n"
#define PSI pair<string,int>
#define PII pair<int,int>
#define PDI pair<double,int>
#define PDD pair<double,double>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
#define code_by_jisam ios::sync_with_stdio(false),cin.tie(nullptr)
using namespace std;
using u32 = unsigned;
using i64 = long long;
using u64 = unsigned long long;
using i128 = __int128;
int dx[] = {-1, 1, 0, 0, 1, 1, -1, -1,};
int dy[] = {0, 0, -1, 1, 1, -1, -1, 1,};
template<typename T>
T combination(T n, T r) {
    vector<vector<T>> dp(n+1, vector<T>(r+1, 0));
    for (T i = 0; i <= n; i++) {
        for (T j = 0; j <= min(i, r); j++) {
            if (j == 0 || j == i) {
                dp[i][j] = 1;
            } else {
                dp[i][j] = dp[i-1][j-1] + dp[i-1][j];
            }
        }
    }
    return dp[n][r];
}
i64 getval(i64 n,i64 i,i64 j)
{
    i64 ret = combination(n,i),sb;
    if(i > n - j) sb = 0;
    else sb = combination(n-j,i);
    return ret - sb;
}
void solution() {
    i64 n;
    cin >> n;
    i64 x1,x2,y1,y2;
    vector<tuple<i64,i64,i64,i64>> xlines;
    vector<i64> ylines;
    for(int i = 1;i <= n; i ++){
        cin >> x1 >> x2>> y1 >> y2;
        xlines.emplace_back(y1,x1,x2,0);
        xlines.emplace_back(y2,x1,x2,1);
        ylines.emplace_back(x1);
        ylines.emplace_back(x2);
    }
    sort(xlines.begin(),xlines.end());
    sort(ylines.begin(),ylines.end());

    map<i64,i64> S,yval;

    i64 prex = 0;

    for(auto & xx : ylines)
    {
        i64 diffx = xx - prex;
        for(auto[pl,val]  : yval){
            S[pl] += diffx * val;
        }
        yval.clear();

        i64 cur = 0,prey = 0;

        for(auto& [yy,xx1,xx2,flag] : xlines){
            if(xx1 <= xx && xx < xx2)
            {
                yval[cur] += yy - prey;
                if (flag == 0) cur ++;
                else cur --;
                prey = yy;
            }
            prex = xx;
        }
    }
    for(int i = 1; i <= n ; i ++){
        i64 ans = 0;
        for(int j = 1; j <= n ; j ++)
        {
            i64 val = getval(n,i,j);
            ans += val * S[j];
        }
        ans /= combination(n,i*1LL);
        cout << ans << endl;
    }
}

int main() {
    code_by_jisam;
    int T = 1;
//    cin >> T;
    while (T--) {
        solution();
    }
    return 0;
}